<?php
namespace Tbf\Bundle\CronBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
 * @ORM\Entity()
 * @ORM\Table(name="tbf_cron_persist")
 */
class PersistCron
{
    /**
     * 持久化cron配置名称标识
     * @var string
     * @ORM\Column()
     * @ORM\Id()
     * @ORM\GeneratedValue(strategy="NONE")
     */
    protected $name;
    /**
     * 所包含的那个cron任务
     * @var \Tbf\Bundle\CronBundle\Entity\Cron
     * @ORM\OneToOne(targetEntity="Cron")
     */
    protected $cron;
    public function __construct($name,Cron $cron)
    {
        $this->name = $name;
        $this->cron = $cron;
    }
    public function getName()
    {
        return $this->name;
    }
    public function getCron()
    {
        return $this->cron;
    }
}
